<template>
    <div class="app-contailer">
        <el-form :model="$data" label-width="160px" label-position="right" size="small">
            <el-row :gutter="15">
                <el-col :span="24">
                    <MmvTitle title="订单信息"></MmvTitle>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="取车类型" required>
                        <el-radio-group v-model="rentalType">
                            <el-radio :label="1">到店取还车</el-radio>
                            <!-- <el-radio :label="2">自助取还车</el-radio> -->
                            <el-radio :label="3">上门送取车</el-radio>
                            <el-radio :label="4">上门送车</el-radio>
                            <el-radio :label="5">上门取车</el-radio>
                        </el-radio-group>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-row :gutter="15">
                        <el-col :span="12" v-if="rentalType==3||rentalType==4">
                            <el-form-item label="取车地址" prop="storeLon">
                                <el-input v-model="takeAddress" style="width:220px;margin-right:15px" placeholder="请地图选点" readonly>
                                    <el-button icon="el-icon-search" slot="append" @click="positionShow=true"></el-button>
                                </el-input>
                                <!-- <el-input v-model="takeLon" placeholder="请地图选点" style="width:220px;margin-right:15px" readonly><template slot="prepend">经度</template></el-input> -->
                                <!-- <el-input v-model="takeLat" placeholder="请地图选点" style="width:220px;margin-right:15px" readonly><template slot="prepend">纬度</template></el-input> -->
                            </el-form-item>
                        </el-col>
                        <el-col :span="12" v-if="rentalType==3||rentalType==5" :offset="Number(!(rentalType==3||rentalType==4)&&12)">
                            <el-form-item label="还车地址" prop="storeLon">
                                <el-input v-model="alsoAddress" style="width:220px;margin-right:15px" placeholder="请地图选点" readonly>
                                    <el-button icon="el-icon-search" slot="append" @click="positionShow2=true"></el-button>
                                </el-input>
                                <!-- <el-input v-model="alsoLon" placeholder="请地图选点" style="width:220px;margin-right:15px" readonly><template slot="prepend">经度</template></el-input> -->
                                <!-- <el-input v-model="alsoLat" placeholder="请地图选点" style="width:220px;margin-right:15px" readonly><template slot="prepend">纬度</template></el-input> -->
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-col>
                <!-- <el-col :span="24" v-if="rentalType==1||rentalType==5"> -->
                <el-col :span="12">
                    <el-form-item label="取车门店" required>
                        <div style="display:flex">
                            <el-input :value="quchemendian.storeName" style="width:220px;margin-right:15px" readonly placeholder="请选择门店">
                                <el-button icon="el-icon-search" slot="append" @click="showmendian=true,mendianType='quchemendian'">
                                </el-button>
                            </el-input>
                        </div>
                    </el-form-item>
                </el-col>
                <!-- <el-col :span="24" v-if="rentalType==1||rentalType==4"> -->
                <el-col :span="12">
                    <el-form-item label="还车门店" required>
                        <div style="display:flex">
                            <el-input :value="huanchemendian.storeName" style="width:220px;margin-right:15px" readonly placeholder="请选择门店">
                                <el-button icon="el-icon-search" slot="append" @click="showmendian=true,mendianType='huanchemendian'">
                                </el-button>
                            </el-input>
                        </div>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="租赁时间" required>
                        <el-date-picker style="width:440px;margin-right:15px" :picker-options="{disabledDate}" v-model="rentalTime" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="clearChexin">
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                <template v-if="showcheliangform">
                    <el-col :span="24">
                        <MmvTitle title="车辆信息"></MmvTitle>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="品牌/车系/车型" required>
                            <div style="display:flex">
                                <el-input :value="chexing.modelInfo" style="width:220px;margin-right:15px" placeholder="请选择车型" readonly>
                                    <el-button icon="el-icon-search" slot="append" @click="showchexing=true"></el-button>
                                </el-input>
                            </div>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="车辆类型" required>
                            <el-input :value="chexing.operatingClassification" style="width:220px;margin-right:15px" placeholder="请选择车型" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="车座" required>
                           <!-- <el-input :value="chexing.seating" style="width:220px;margin-right:15px" placeholder="请选择车型" readonly>
                            </el-input> -->
                            <el-select v-model="chexing.seating" placeholder="请选择座位" class="el-input-style" disabled>
                              <el-option
                                v-for="dict in dict.type.seat"
                                :key="dict.value"
                                :label="dict.label"
                                :value="dict.value"
                              ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="排量" required>
                            <el-input :value="chexing.displacement" style="width:220px;margin-right:15px" placeholder="请选择车型" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="变速箱" required>
                            <el-input :value="chexing.speedChangingBox" style="width:220px;margin-right:15px" placeholder="请选择车型" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <MmvTitle title="费用信息"></MmvTitle>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="租赁天数（天）" required>
                            <el-input :value="leaseDays" style="width:220px;margin-right:15px" placeholder="请选择租赁时间" readonly>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="租车费用（元）" required>
                            <el-input v-model="rent" placeholder="请选择车型" style="width:220px;margin-right:15px" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="车辆押金（元）" required>
                            <el-input v-model="deposit" placeholder="请选择车型" style="width:220px;margin-right:15px" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="违章押金（元）" required>
                            <el-input v-model="illegalDeposit" placeholder="请选择车型" style="width:220px;margin-right:15px" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-table :data="chargeItemsVo">
                            <el-table-column label="收费项名称" prop="chargeProjectName"></el-table-column>
                            <el-table-column label="费用" prop="chargeMoney"></el-table-column>
                            <el-table-column label="收费类型" prop="chargeItemsType">
                                <template slot-scope="{row}">
                                    {{ {1:'按次', 2:'按天', 3:'按里程', 6:'按个'}[Number(row.chargeItemsType)] }}
                                </template>
                            </el-table-column>
                            <el-table-column label="单价" prop="unitPrice"></el-table-column>
                            <el-table-column label="操作">
                                <template slot-scope="{row}">
                                    <el-switch v-model="row.checked" active-text="" :disabled="row.isOptional==2"></el-switch>
                                </template>
                            </el-table-column>
                        </el-table>
                        <br>
                    </el-col>
                </template>
                <template v-if="showkehuform">
                    <el-col :span="24">
                        <MmvTitle title="客户信息"></MmvTitle>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="选择客户" required>
                            <div style="display:flex">
                                <el-input :value="kehu.memberName" style="width:220px;margin-right:15px" placeholder="请选择客户" readonly>
                                    <el-button icon="el-icon-search" slot="append" @click="showkehu=true"></el-button>
                                </el-input>
                            </div>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="客户类型" required>
                            <el-input :value="kehu.memberType|memberType" style="width:220px;margin-right:15px" placeholder="请选择客户" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="客户来源" required>
                            <el-input :value="kehu.memberSource|memberSource" style="width:220px;margin-right:15px" placeholder="请选择客户" readonly></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="联系方式" required>
                            <el-input :value="kehu.contactPhone" style="width:220px;margin-right:15px" placeholder="请选择客户" readonly>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item label="联系地址" required>
                            <el-input :value="kehu.contactAddress" style="width:88%;margin-right:15px" placeholder="请选择客户" readonly>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="证件号码" required>
                            <el-input :value="kehu.cardId" style="width:220px;margin-right:15px" placeholder="请选择客户" readonly>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="失效日期" required>
                            <el-input :value="kehu.cardValidity" style="width:220px;margin-right:15px" placeholder="请选择客户" readonly>
                            </el-input>
                        </el-form-item>
                    </el-col>
                </template>
                <template v-if="showqitaform">
                    <el-col :span="24">
                        <MmvTitle title="其他信息"></MmvTitle>
                    </el-col>
                    <!-- <el-col :span="24">
                        <el-form-item label="订单来源">
                            <el-radio-group v-model="orderSource">
                                <template v-for="item in dict.type.sys_order_source">
                                    <el-radio :label="item.value" :key="item.value">{{item.label}}</el-radio>
                                </template>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item label="下单人">
                            <el-input :value="userInfo.name" style="width:220px;margin-right:15px" placeholder="下单人" readonly></el-input>
                        </el-form-item>
                    </el-col> -->
                    <el-col :span="24">
                        <el-form-item label="支付类型" required>
                            <el-radio-group v-model="payType">
                                <!-- <template v-for="item in dict.type.sys_pay_type">
                                    <el-radio :label="item.value" :key="item.value">{{item.label}}</el-radio>
                                </template> -->
                                <el-radio :label="1">线上</el-radio>
                                <el-radio :label="2">线下</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24" v-if="payType==2">
                        <el-form-item label="支付方式" required>
                            <el-radio-group v-model="payWay">
                                <!-- <template v-for="item in dict.type.order_payWay">
                                    <el-radio ::label="item.value" :key="item.value">{{item.:label}}</el-radio>
                                </template> -->
                                <el-radio :label="1">微信</el-radio>
                                <el-radio :label="2">支付宝</el-radio>
                                <el-radio :label="3">信用卡</el-radio>
                                <el-radio :label="4">现金</el-radio>
                            </el-radio-group>
                        </el-form-item>
                    </el-col>
                </template>
            </el-row>
        </el-form>

        <!-- 选择门店 -->
        <MmvMendian :show="showmendian" @success="submitmendian"></MmvMendian>
        <!--地图选点取车 -->
        <el-dialog title="地图选点" :visible.sync="positionShow" width="800px" append-to-body>
            <position :showText="false" @input="getMapInfo" :areaName="takeAddress" v-if="positionShow" />
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="positionShow=false">确定</el-button>
            </div>
        </el-dialog>
        <!--地图选点还车 -->
        <el-dialog title="地图选点" :visible.sync="positionShow2" width="800px" append-to-body>
            <position :showText="false" @input="getMapInfo2" :areaName="alsoAddress" v-if="positionShow2" />
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="positionShow2=false">确定</el-button>
            </div>
        </el-dialog>
        <!-- 选择车型 -->
        <el-dialog title="选择车型" width="1100px" destroy-on-close append-to-body :visible.sync="showchexing">
            <MmvChexing ref="MmvChexing" @checked="submitchenxing" :storeId="quchemendian.storeId" :startTime="rentalTime[0]" :endTime="rentalTime[1]" v-if="showchexing"></MmvChexing>
        </el-dialog>
        <!-- 选择客户 -->
        <el-dialog title="选择客户" width="1100px" destroy-on-close append-to-body :visible.sync="showkehu">
            <MmvMember ref="MmvMember" v-if="showkehu" @success="submitkehu"></MmvMember>
        </el-dialog>
    </div>
</template>

<script>
import * as api from '@/api/luxuryOrder/index'
import position from "@/components/BaiduMap/baiduMapSeach.vue"
import MmvTitle from '@/components/MmvUI/MmvTitle.vue'
import * as utils from '@/utils'
import MmvMember from '@/views/components/selectMember.vue'
// import MmvMendian from '@/views/store/index.vue'
import MmvMendian from '@/views/components/selectStore.vue'
import MmvKehu from '@/views/member/index.vue'
// import MmvMendian from './components/mendian.vue'
import MmvChexing from './components/chexing.vue'

export default {
    components: {
        MmvTitle,
        MmvMendian,
        MmvMember,
        MmvChexing,
        MmvKehu,
        position,
    },
    dicts: ['sys_order_source', 'sys_pay_type', 'order_payWay','seat'],
    filters: {
        memberType(val) {
            return {
                1: '企业',
                2: '个人',
            }[Number(val)] || '';
        },
        memberSource(val) {
            return {
                1: '搜索',
                2: '分享',
                3: '扫码',
                4: '手动录入',
            }[Number(val)] || '';
        },
    },
    props: ['orderNo'],
    data() {
        return {
            orderType: '', //订单类型
            rentalType: 1, //取车类型
            // takeStoreId: '',//取车门店
            // alsoStoreId: '',//还车门店
            rentalTime: [], // 租赁时间
            takeAddress: '', //预约取车地址
            takeLon: '', //预约取车经度
            takeLat: '', //预约取车纬度
            alsoAddress: '', //预约还车地址
            alsoLon: '', //预约还车经度
            alsoLat: '', //预约还车纬度
            deposit: '', //押金金额
            // rent: 0,//租金金额
            leaseDays: 0,
            illegalDeposit: '', //违章押金
            chargeItemsVo: [ //收费项
                // {
                //     chargeItemsName: '',//收费项名称
                //     price: 0 //费用
                // }
            ],
            orderSource: 0, //订单来源
            payType: 0, //支付类型
            payWay: 0, //支付方式
            // 选择门店
            showmendian: false,
            mendianType: 'quchemendian',
            quchemendian: {}, // 取车门店
            huanchemendian: {}, // 还车门店
            // 选择车型
            showchexing: false,
            chexing: {}, // 车型
            meal: {
                planMealId: null,
            }, // 套餐
            // 选择客户
            showkehu: false,
            kehu: {},
            // 地图选点
            positionShow: false,
            positionShow2: false,
            labelName: '',
            form: {
                areaName: '',
                storeLon: '', // 经度
                storeLat: '', // 纬度
            },
        };
    },
    computed: {
        userInfo() {
            // console.log(this.$store.state)
            return this.$store.state.user || {};
        },
        // 租期
        // leaseDays() {
        //   const start = new Date(this.rentalTime[0]).getTime();
        //   const end = new Date(this.rentalTime[1]).getTime();
        //   return Math.ceil((end - start) / (24 * 60 * 60 * 1000)) + 1 || '';
        // },
        // 显示车辆信息表单
        showcheliangform() {
            // return true
            // 未选择门店
            if (!this.formData.takeStoreId || !this.formData.alsoStoreId) {
                return false;
            }
            // 未选择租赁时间
            if (!this.formData.rentalStartTime || !this.formData.rentalEndTime) {
                return false;
            }
            return true;
        },
        // 显示客户信息表单
        showkehuform() {
            // 未显示车辆表单
            if (!this.showcheliangform) {
                return false;
            }
            // 未选择车型
            if (!this.formData.planId) {
                return false;
            }
            return true;
        },
        // 显示其他信息表单
        showqitaform() {
            // 未显示客户表单
            if (!this.showkehuform) {
                return false;
            }
            // 未选择客户
            if (!this.formData.memberNo) {
                return false;
            }
            return true;
        },
        // 显示提交按钮
        showtijiaobutton() {
            if (!this.showqitaform) {
                return false;
            }
            return true;
        },
        // 租金
        rent() {
            const arr = this.chargeItemsVo.filter(val => val.checked);
            let total = 0;
            arr.forEach(val => {
                total += val.chargeMoney;
            });
            return total || 0;
        },
        formData() {
            const formData = {
                orderNo: this.orderNo,
                orderType: this.rentalType, //订单类型
                rentalType: this.rentalType, //取车类型
                takeStoreId: this.quchemendian.storeId, //取车门店
                alsoStoreId: this.huanchemendian.storeId, //还车门店
                rentalStartTime: this.rentalTime[0], //取车时间
                rentalEndTime: this.rentalTime[1], //还车时间
                leaseDays: this.leaseDays, //租期
                takeAddress: this.takeAddress, //预约取车地址
                takeLon: this.takeLon, //预约取车经度
                takeLat: this.takeLat, //预约取车纬度
                alsoAddress: this.alsoAddress, //预约还车地址
                alsoLon: this.alsoLon, //预约还车经度
                alsoLat: this.alsoLat, //预约还车纬度
                planId: this.chexing.planId, //方案id
                planMealId: this.meal.planMealId, //套餐id
                deposit: this.deposit, //押金金额
                rent: this.rent, //租金金额
                illegalDeposit: this.illegalDeposit, //违章押金
                chargeItemsVo: this.chargeItemsVo.filter(val => val.checked), //收费项
                memberNo: this.kehu.memberNo, //客户编号
                orderSource: this.orderSource, //订单来源
                payType: this.payType, //支付类型
                payWay: this.payWay, //支付方式
            };
            return formData;
        },
    },
    created() {
        if (this.orderNo) {
            this.getData();
        }
    },
    methods: {
        // 抛出表单
        emitData() {
            if (!this.showtijiaobutton) {
                this.$message.error('表单填写未完成');
                return;
            }
            return this.formData;
        },
        /*
        |--------------------------------------------------------------------------
        | 初始化编辑订单数据
        |--------------------------------------------------------------------------
        */
        getData() {
            api.detail(this.orderNo).then(response => {
                this.orderType = response.data?.orderInfo.rentalType; // 订单类型
                this.rentalType = response.data?.orderInfo.rentalType; // 取车类型
                this.quchemendian = {
                    storeId: response.data?.orderInfo.takeStoreId, // 取车门店id
                    storeName: response.data?.orderInfo.takeStoreName, // 取车门店
                };
                this.huanchemendian = {
                    storeId: response.data?.orderInfo.alsoStoreId, // 还车门店id
                    storeName: response.data?.orderInfo.alsoStoreName, // 还车门店
                };
                this.rentalTime = [
                    response.data?.orderInfo.rentalStartTime, // 取车时间
                    response.data?.orderInfo.rentalEndTime, // 还车时间
                ];
                this.takeAddress = response.data?.orderInfo.takeAddress; // 预约取车地址
                this.takeLon = response.data?.orderInfo.takeLon; // 预约取车经度
                this.takeLat = response.data?.orderInfo.takeLat; // 预约取车纬度
                this.alsoAddress = response.data?.orderInfo.alsoAddress; // 预约还车地址
                this.alsoLon = response.data?.orderInfo.alsoLon; // 预约还车经度
                this.alsoLat = response.data?.orderInfo.alsoLat; // 预约还车纬度
                this.chexing = {
                    planId: response.data?.orderInfo.planId, // 方案id
                    modelInfo: response.data?.carInfo.modelName, // 车型车系
                    modelName: response.data?.carInfo.modelName, // 车型车系
                    carNo: response.data?.carInfo.carNo, // 车牌号
                    vinNo: response.data?.carInfo.vinNo, // 车架号
                    engineNo: response.data?.carInfo.engineNo, // 发动机号
                    styleModel: response.data?.carInfo.styleModel, // 能源形式
                    fuelType: response.data?.carInfo.fuelType, // 燃油类型
                    seating: response.data?.carInfo.seating, // 车座数
                    speedChangingBox: response.data?.carInfo.speedChangingBox, // 变速箱
                    displacement: response.data?.carInfo.displacement, // 排量
                    operatingClassification: response.data?.carInfo.operatingClassification, // 车辆类型
                };
                this.meal = {
                    planMealId: response.data?.orderInfo.planMealId, // 需要套餐方案id去查询豪车选择方案套餐
                }
                // 还原租金金额
                this.submitchenxing({
                    Moldel: this.chexing,
                    Meal: this.meal,
                });
                this.kehu = response.data?.customerInfo || {}; // 还原客户信息
                this.orderSource = Number(response.data?.orderInfo.orderSource); // 订单来源
                this.payType = Number(response.data?.orderInfo.rentPayType); // 支付类型
                this.payWay = Number(response.data?.orderInfo.rentPayWay); // 支付方式
            });
        },

        // 选择门店
        submitmendian(data) {
            this[this.mendianType] = data;
            this.showmendian = false;
            this.clearChexin()
        },
        clearChexin() {
            this.chexing = {};
            this.meal = {};
            this.deposit = 0; // 租车押金
            this.leaseDays = 0; // 租期
            this.illegalDeposit = 0; // 违章押金
            this.chargeItemsVo = []
        },
        // 选择客户
        submitkehu(data) {
            // this.kehu = this.$refs?.MmvKehu?.emitData() || {};
            this.kehu = data;
            this.showkehu = false;
        },

        /*
        |--------------------------------------------------------------------------
        | 地图选点
        |--------------------------------------------------------------------------
        */
        getMapInfo(res) {
            this.takeLon = JSON.parse(res).lng;
            this.takeLat = JSON.parse(res).lat;
            this.takeAddress = JSON.parse(res).address
        },
        getMapInfo2(res) {
            this.alsoLon = JSON.parse(res).lng;
            this.alsoLat = JSON.parse(res).lat;
            this.alsoAddress = JSON.parse(res).address
        },

        /*
        |--------------------------------------------------------------------------
        | 车辆信息
        |--------------------------------------------------------------------------
        */
        // 选择车型
        submitchenxing({
            Moldel,
            Meal
        }) {
            this.chexing = Moldel;
            this.meal = Meal;
            this.showchexing = false;
          this.rentalTime = [
            this.rentalTime[0],
            utils.parseTime(new Date(new Date(this.rentalTime[0]).getTime() + this.meal.days * 24 * 60 * 60 * 1000))
          ];
            this.getconfirmationOrder(this.chexing.planId, this.meal.planMealId);
        },
        // 豪车选择方案套餐
        getconfirmationOrder(planId, planMealId) {
            api.confirmationOrder({
                planId: planId, // 方案套餐id
                planMealId: planMealId, // 方案套餐id
                startTime: this.rentalTime[0], //取车时间
                endTime: this.rentalTime[1], //还车时间
                takeStoreId: this.quchemendian.storeId, //取车门店
                alsoStoreId: this.huanchemendian.storeId, //还车门店
                differentStoresCar: this.quchemendian.storeId == this.huanchemendian.storeId ? 2 : 1, // 跨网点还车（1.是 2.否）
                rentalType: this.rentalType, //取车类型
            }).then(response => {
                this.deposit = response.data?.deposit || 0; // 租车押金
                this.leaseDays = response.data?.days || 0; // 租期

                // this.$message.success('租赁时间已更新');
                // this.rent = response.data?.rent || 0; // 租金
                this.illegalDeposit = response.data?.illegalDeposit || 0; // 违章押金
                const chargingItemsVoList = response.data?.chargingItemsVoList || []; // 上门 取车 还车 异店 费用
                // const mandatoryOtherCostList = response.data?.mandatoryOtherCostList || []; // 其他费用—必选
                const noMandatoryOtherCostList = response.data?.noMandatoryOtherCostList || []; // 其他费用—非必选
                this.chargeItemsVo = [...chargingItemsVoList].map(val => {
                    val.checked = true;
                    return val;
                })
                const arr = [...noMandatoryOtherCostList].map(val => {
                    val.checked = false;
                    return val;
                })
                this.chargeItemsVo = [...this.chargeItemsVo, ...arr];
            })
        },

        /*
        |--------------------------------------------------------------------------
        | 时间禁用处理
        |--------------------------------------------------------------------------
        */
        disabledDate(date) {
            console.log(date)
            return new Date().getTime() >= new Date(date).getTime() + 24 * 60 * 60 * 1000;
        },
    },
}
</script>
